package com.bestcem.xm.qdes.controller.param;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 题目库-添加模板保存/列表操作复制按钮功能
 *
 * 保存
 * {
 *     "project_id": "62da0ee5aace70000894badd",
 *     "gid_list": [2],
 *     "tags": {"2": [{
 *         "tagid": "6209f95caace70000972ecbd",
 *         "tag_title": "测试测试测试测试测试"
 *     }]}
 * }
 * 复制
 * {
 *     "project_id": "62f460dbaace70000727dd2a",
 *     "with_copy": true,
 *     "tag_list": [{
 *         "tagid": "6209f964aace70000a72f31b",
 *         "tag_title": "测试稿"
 *     }]
 * }
 */
@Data
public class QuestionLibSaveAndCopyParam {
    /**
     * 都有
     */
    @NotNull(message = "项目编号不能为空")
    @JsonProperty("project_id")
    private String projectId;
    /**
     * 仅复制有
     */
    @JsonProperty("with_copy")
    private Boolean withCopy;
    /**
     * 仅保存有
     */
    @JsonProperty("gid_list")
    private List<Integer> gidList;
    /**
     * 仅保存有
     */
    @JsonProperty("tags")
    private JSONObject tags;
    /**
     * 仅复制有
     */
    @JsonProperty("tag_list")
    private List<TagLibParam> tagList;
}
